namespace ElectricalSymbols;

using StackExchange.Redis;

public static class RedisHelper
{
	private static IDatabase redisDb;

	public static void Conn()
	{
		string redisConnectionString = "172.26.172.124:6379,password=password";
		ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(redisConnectionString);
		redisDb = redis.GetDatabase();
		redisDb.StringGet("");
	}

	public static bool GetBoolValue(string tag)
	{
		var v = redisDb.StringGet(tag).ToString();
		var ok = bool.TryParse(v, out bool result);
		return result;
	}
}